package com.example.mapper;

import com.example.entity.Interview;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface InterviewMapper {

    int insert(Interview interview);

    void updateById(Interview interview);

    void deleteById(Integer id);

    @Select("select * from `interview` where id = #{id}")
    Interview selectById(Integer id);

    List<Interview> selectAll(Interview interview);

    @Select("select * from interview where user_id = #{userId} and position_id = #{positionId}")
    List<Interview> selectByUserIdAndPositionId(@Param("userId") Integer userId, @Param("positionId") Integer positionId);
}
